package day3;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

//测试字符流和缓冲流
public class TestChar {
    public static void main(String[] args) {
        try(FileReader fr = new FileReader("d://io//testIO.txt");
            FileWriter fw = new FileWriter("d://io//newtestIO.txt");
            BufferedReader br = new BufferedReader(fr);
            BufferedWriter bw = new BufferedWriter(fw)){
            String msg = "";
            while ((msg = br.readLine())!=null){
                bw.write(msg);
                bw.newLine();
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
